<!--
  ~ The MIT License (MIT)
  ~
  ~ Copyright (c) 2019 ‭‭‭‭‭‭‭‭‭‭‭‭[smallbun] www.smallbun.org
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
  ~ this software and associated documentation files (the "Software"), to deal in
  ~ the Software without restriction, including without limitation the rights to
  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  ~ the Software, and to permit persons to whom the Software is furnished to do so,
  ~ subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  ~ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  ~ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  ~ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  ~ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  -->

<!DOCTYPE html>
<!--suppress ALL-->
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登录</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 告诉浏览器响应屏幕宽度 -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/webjars/bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css}"/>
    <link rel="stylesheet" th:href="@{/webjars/font-awesome/4.7.0/css/font-awesome.min.css}"/>
    <link rel="stylesheet" th:href="@{/static/common/css/AdminLTE.min.css}"/>
    <script>
        if (top.location != location) {
            top.location.href = location.href;
        }
    </script>
    <!--[if IE 8]>
    <script th:src="@{/static/fast/js/browser-not-supported-ie8.js}"></script>
    <![endif]-->
    <!--[if lt IE 9]>
    <script th:src="@{/webjars/html5shiv/3.7.3/html5shiv.min.js}"></script>
    <script th:src="@{/webjars/respond/1.4.2/dest/respond.min.js}"></script>
    <![endif]-->
    <link rel="stylesheet" th:href="@{/static/modules/manage/css/login.css}">
</head>
<body class="hold-transition login-page" style="overflow: hidden;">
<div id="LOGIN-PAGE">
    <!--演示模式-->
    <th:block th:if="${open}">
        <p class="bg-success text-center demo">演示模式</p>
    </th:block>
    <div class="login-box">
        <div class="login-logo" th:text="${title}"></div>
        <div class="login-box-body">
            <!--错误消息-->
            <p class="login-box-msg" style="color: red" id="msg"></p>
            <!--表单-->
            <form th:action="@{/login}" method="post" id="form" data-toggle="validator">
                <!--用户名-->
                <div class="form-group username">
                    <label for="username">用户名:</label>
                    <div class="form-group has-feedback username">
                        <!--演示模式-->
                        <th:block th:if="${open}">
                            <input type="text" class="form-control" th:value="${username}" autocomplete="off"
                                   id="username" name="username"
                                   placeholder="请输入用户名">
                            <span class="fa fa-user form-control-feedback"></span>
                        </th:block>
                        <!--非演示模式-->
                        <th:block th:unless="${open}">
                            <input type="text" class="form-control" autocomplete="off"
                                   id="username" name="username"
                                   placeholder="请输入用户名">
                            <span class="fa fa-user form-control-feedback"></span>
                        </th:block>
                    </div>
                </div>
                <!--密码-->
                <div class="form-group password">
                    <label for="password">密码:</label>
                    <div class="form-group has-feedback password">
                        <!--演示模式-->
                        <th:block th:if="${open}">
                            <input type="password" class="form-control" th:value="${password}" id="password"
                                   name="password" autocomplete="off"
                                   placeholder="请输入密码">
                            <span class="fa fa-key form-control-feedback"></span>
                        </th:block>
                        <!--非演示模式-->
                        <th:block th:unless="${open}">
                            <input type="password" class="form-control" id="password" name="password" autocomplete="off"
                                   placeholder="请输入密码">
                            <span class="fa fa-key form-control-feedback"></span>
                        </th:block>
                    </div>
                </div>
                <!--验证码-->
                <div class="form-group captcha">
                    <label for="KAPTCHA_SESSION_KEY">验证码:</label>
                    <div class="row">
                        <div class="col-xs-7">
                            <div class="form-group has-feedback captcha">
                                <input type="text" class="form-control" id="KAPTCHA_SESSION_KEY"
                                       name="KAPTCHA_SESSION_KEY" disableautocomplete placeholder="请输入验证码"
                                       autocomplete="off">
                                <span class="fa fa-shield form-control-feedback"></span>
                            </div>
                        </div>
                        <img class="col-xs-5" id="captcha" height="34px" onclick="reloadCode()"
                             th:src="@{/captcha}"/>
                    </div>
                </div>
                <!--登录按钮-->
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">登录
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--脚注-->
<div class="footer" id="footer">
    <div class="container">
        <p align="center" style="font-size: 15px" class="center-block">
            版权所有 &copy; <a href="https://www.smallbun.com" th:text="${title}"></a>
            <span th:text="${'2018 - '+#dates.format(new java.util.Date().getTime(), 'yyyy')}"></span>
        </p>
    </div>
</div>
<script th:src="@{/webjars/jquery/3.3.1/jquery.min.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7/js/bootstrap.min.js}"></script>
<script th:src="@{/webjars/bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js}"></script>
<script th:src="@{/static/common/plugins/jsencrypt/jsencrypt.min.js}"></script>
<script th:src="@{/static/modules/manage/js/login.js}"></script>
<!--<script th:src="@{/static/common/js/console.min.js}"></script>-->
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    contextPath = /*[[@{/}]]*/ '';
    /*]]>*/
</script>
</body>
</html>
